import { ref } from 'vue'
import { PanelContextMenuEnum } from '@/enums'

export function usePanelContextMenu (emits: Function) {
  return ref([
    {
      label: '粘贴',
      icon: 'DocumentAdd',
      id: 1,
      handlerConfig: (event: MouseEvent) => {
        emits(PanelContextMenuEnum.PASTE, event)
      }
    },
    {
      label: '清空剪切板',
      icon: 'BrushFilled',
      id: 2,
      handlerConfig: () => {
        emits(PanelContextMenuEnum.CLEAR_CUT)
      }
    },
    {
      label: '清空画板',
      icon: 'Refresh',
      id: 3,
      handlerConfig: () => {
        emits(PanelContextMenuEnum.CLEAR_PANEL)
      }
    },
  ])
}